fn main() {
    println!("Hello, world!");
    let s = "Chez Rutabaga".to_string();
    let t1 = s;     // `t1` takes ownership from `s`
    //    let t2 = s;     // compile-time error: use of moved value: `s`
    let t2 = t1;     // compile-time error: use of moved value: `s`
    println!("{}", t2);
    testClone();

    //    println!(s);
    //    println!(&s);
    testOwnerShip();
}

fn add_oomph(mut t: String) {
    t.push('!');
}

fn add_oomph2(mut t: String) -> String {
    t.push('!');
    t
}

fn testOwnerShip() {
    let mut s = "Hello World".to_string();
//    add_oomph(s);
    s = add_oomph2(s);
    println!("{}", s)
}


fn testClone() {
    let s = "Chez Rutabaga".to_string();
    let t1 = s.clone();
    let t2 = s.clone();
}